<?php
class HttpRequestController extends Zend_Controller_Action
{
	private $_acl;
	private $_user_info;
	
    public function init()
    {
    	$this->_helper->layout()->disableLayout();
    }
    
    /**
     * Retorna un json a partir de un objeto modelo, 
     * enviar nombre de clase modelo separada por "_" y sin sufijo "Model",
     * ej: enviar "model=solicitud_th" en lugar de "model=SolicitudThModel" 
     * @return json
     */

    public function indexAction()
    {
	
    }
    
    public function curlAction()
    {
    	if(!Zend_Auth::getInstance()->hasIdentity()) $this->_redirect('index/login');
    	$this->_user_info = Zend_Auth::getInstance()->getStorage()->read();
        $this->_acl = new Zwei_Admin_Acl($this->_user_info->user_name);
        
        $Form = new Zwei_Utils_Form();
        $response=Zwei_Utils_File::getResponseFromService($Form->url, @$Form->params, @$Form->user, @$Form->password);
        
        $this->view->content=$response['response'];
       	//exit();
    	
    }
}
